import request from "@/utils/request.js";

const url = '/cloud-message-service/sms-account'

/**
 * 分页查询短信账户
 */
export function page(data) {
    return request({
        url: url + "/page",
        method: "post",
        data
    });
}

/**
 * 获取所有短信账户
 */
export function listSmsAccount() {
    return request({
        url: url + "/listSmsAccount",
        method: "get",
    });
}

/**
 * 新增或修改短信账户
 */
export function save(data) {
    return request({
        url: url + "/save",
        method: "post",
        data
    });
}

/**
 * 根据id删除短信账户
 */
export function removeById(id) {
    return request({
        url: url + `/removeById/${id}`,
        method: "get",
    });
}

/**
 * 根据id查看短信账户
 */
export function getById(id) {
    return request({
        url: url + `/getById/${id}`,
        method: "get",
    });
}

// 列表相关列信息
export const columnInfo = [
    {
        "title":"序号",
        "type":"seq",
        "fixed":"left",
        "align":"center",
        "width":"60"
    },
    {
        "title":"短信渠道",
        "field":"channelNameCodeTxt",
        "align":"center",
        "minWidth":"150"
    },
    {
        "title":"操作人员",
        "field":"createByTxt",
        "align":"center",
        "minWidth":"100"
    },
    {
        "title":"创建时间",
        "field":"createTime",
        "align":"center",
        "minWidth":"150"
    },
    {
        "title":"操作",
        "field":"operate",
        "fixed":"right",
        "align":"center",
        "proxyColumn":true,
        "minWidth":"120px",
        /*"options":[
            {
                "text":true,
                "btnName":"重置密码",
                "type":"primary",
                "icon":"RefreshLeft",
                "method":"showFormDialog"
            },
        ]*/
    }
]
